package com.starlink.model.dtomapper;

import com.starlink.model.domain.BookReadingRecordDO;
import com.starlink.model.request.BookReadingRecordRequest;
import com.starlink.model.vo.BookReadingRecordVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * @author zhanghong
 */
@Mapper(componentModel = "spring")
public interface BookReadingRecordDtoMapper {

    BookReadingRecordDtoMapper INSTANCE = Mappers.getMapper(BookReadingRecordDtoMapper.class);

    /**
    * DO to VO
    * @param bookReadingRecordDO
    * @return
    */
    BookReadingRecordVO do2VO(BookReadingRecordDO bookReadingRecordDO);

    /**
     * request to DO
     * @param request
     * @return
     */
    BookReadingRecordDO request2DO(BookReadingRecordRequest request);
}
